<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <link href="./css/caishu.css" rel="stylesheet">
    <script>
        var tiankongNumber;
        var suijiNumber = Math.round(Math.random()*100);
        document.write(suijiNumber);
        function bijiaoNumber() {
            var yonghuNumber = document.getElementById("shuruNumber");
            tiankongNumber = yonghuNumber.value;
            if(isNaN(tiankongNumber)) {
                alert("请输入数字！");
                return false;
            }
            if(suijiNumber==tiankongNumber)
            alert("你猜对了！");
            else if(suijiNumber<tiankongNumber)
            alert("再小一点哦！");
            else
            alert("再大一点！");
        }
    </script>
</head>
<body>
    <div class="quanti">
    <h1 >猜数游戏</h1>
    <p>系统将生成1-100的随机数，请输入你的猜想数！</p>
    <input type="text" id="shuruNumber" autocomplete="false" placeholder="请输入一个1-100的整数！"><br><br>
    <input type="button" value="提交" onclick="bijiaoNumber()">
    </div>
</body>
</html>